\(\int (a+i a \tan (e+f x))^2 (A+B \tan (e+f x)) (c-i c \tan (e+f x))^5 \, dx\) [677]

   Optimal result
   Rubi [A] (verified)
   Mathematica [B] (verified)
   Maple [A] (verified)
   Fricas [A] (verification not implemented)
   Sympy [B] (verification not implemented)
   Maxima [A] (verification not implemented)
   Giac [B] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 41, antiderivative size = 99 \[ \int (a+i a \tan (e+f x))^2 (A+B \tan (e+f x)) (c-i c \tan (e+f x))^5 \, dx=\frac {2 a^2 (i A+B) c^5 (1-i \tan (e+f x))^5}{5 f}-\frac {a^2 (i A+3 B) c^5 (1-i \tan (e+f x))^6}{6 f}+\frac {a^2 B c^5 (1-i \tan (e+f x))^7}{7 f} \]

[Out]

2/5*a^2*(I*A+B)*c^5*(1-I*tan(f*x+e))^5/f-1/6*a^2*(I*A+3*B)*c^5*(1-I*tan(f*x+e))^6/f+1/7*a^2*B*c^5*(1-I*tan(f*x
+e))^7/f

Rubi [A] (verified)

Time = 0.20 (sec) , antiderivative size = 99, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.049, Rules used = {3669, 78} \[ \int (a+i a \tan (e+f x))^2 (A+B \tan (e+f x)) (c-i c \tan (e+f x))^5 \, dx=-\frac {a^2 c^5 (3 B+i A) (1-i \tan (e+f x))^6}{6 f}+\frac {2 a^2 c^5 (B+i A) (1-i \tan (e+f x))^5}{5 f}+\frac {a^2 B c^5 (1-i \tan (e+f x))^7}{7 f} \]

[In]

Int[(a + I*a*Tan[e + f*x])^2*(A + B*Tan[e + f*x])*(c - I*c*Tan[e + f*x])^5,x]

[Out]

(2*a^2*(I*A + B)*c^5*(1 - I*Tan[e + f*x])^5)/(5*f) - (a^2*(I*A + 3*B)*c^5*(1 - I*Tan[e + f*x])^6)/(6*f) + (a^2
*B*c^5*(1 - I*Tan[e + f*x])^7)/(7*f)

Rule 78

Int[((a_.) + (b_.)*(x_))*((c_) + (d_.)*(x_))^(n_.)*((e_.) + (f_.)*(x_))^(p_.), x_Symbol] :> Int[ExpandIntegran
d[(a + b*x)*(c + d*x)^n*(e + f*x)^p, x], x] /; FreeQ[{a, b, c, d, e, f, n}, x] && NeQ[b*c - a*d, 0] && ((ILtQ[
n, 0] && ILtQ[p, 0]) || EqQ[p, 1] || (IGtQ[p, 0] && ( !IntegerQ[n] || LeQ[9*p + 5*(n + 2), 0] || GeQ[n + p + 1
, 0] || (GeQ[n + p + 2, 0] && RationalQ[a, b, c, d, e, f]))))

Rule 3669

Int[((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(m_.)*((A_.) + (B_.)*tan[(e_.) + (f_.)*(x_)])*((c_) + (d_.)*tan[(e_
.) + (f_.)*(x_)])^(n_.), x_Symbol] :> Dist[a*(c/f), Subst[Int[(a + b*x)^(m - 1)*(c + d*x)^(n - 1)*(A + B*x), x
], x, Tan[e + f*x]], x] /; FreeQ[{a, b, c, d, e, f, A, B, m, n}, x] && EqQ[b*c + a*d, 0] && EqQ[a^2 + b^2, 0]

Rubi steps \begin{align*} \text {integral}& = \frac {(a c) \text {Subst}\left (\int (a+i a x) (A+B x) (c-i c x)^4 \, dx,x,\tan (e+f x)\right )}{f} \\ & = \frac {(a c) \text {Subst}\left (\int \left (2 a (A-i B) (c-i c x)^4-\frac {a (A-3 i B) (c-i c x)^5}{c}-\frac {i a B (c-i c x)^6}{c^2}\right ) \, dx,x,\tan (e+f x)\right )}{f} \\ & = \frac {2 a^2 (i A+B) c^5 (1-i \tan (e+f x))^5}{5 f}-\frac {a^2 (i A+3 B) c^5 (1-i \tan (e+f x))^6}{6 f}+\frac {a^2 B c^5 (1-i \tan (e+f x))^7}{7 f} \\ \end{align*}

Mathematica [B] (verified)

Both result and optimal contain complex but leaf count is larger than twice the leaf count of optimal. \(270\) vs. \(2(99)=198\).

Time = 1.99 (sec) , antiderivative size = 270, normalized size of antiderivative = 2.73 \[ \int (a+i a \tan (e+f x))^2 (A+B \tan (e+f x)) (c-i c \tan (e+f x))^5 \, dx=\frac {a^2 A c^5 \tan (e+f x)}{f}-\frac {3 i a^2 A c^5 \tan ^2(e+f x)}{2 f}+\frac {a^2 B c^5 \tan ^2(e+f x)}{2 f}-\frac {2 a^2 A c^5 \tan ^3(e+f x)}{3 f}-\frac {i a^2 B c^5 \tan ^3(e+f x)}{f}-\frac {i a^2 A c^5 \tan ^4(e+f x)}{2 f}-\frac {a^2 B c^5 \tan ^4(e+f x)}{2 f}-\frac {3 a^2 A c^5 \tan ^5(e+f x)}{5 f}-\frac {2 i a^2 B c^5 \tan ^5(e+f x)}{5 f}+\frac {i a^2 A c^5 \tan ^6(e+f x)}{6 f}-\frac {a^2 B c^5 \tan ^6(e+f x)}{2 f}+\frac {i a^2 B c^5 \tan ^7(e+f x)}{7 f} \]

[In]

Integrate[(a + I*a*Tan[e + f*x])^2*(A + B*Tan[e + f*x])*(c - I*c*Tan[e + f*x])^5,x]

[Out]

(a^2*A*c^5*Tan[e + f*x])/f - (((3*I)/2)*a^2*A*c^5*Tan[e + f*x]^2)/f + (a^2*B*c^5*Tan[e + f*x]^2)/(2*f) - (2*a^
2*A*c^5*Tan[e + f*x]^3)/(3*f) - (I*a^2*B*c^5*Tan[e + f*x]^3)/f - ((I/2)*a^2*A*c^5*Tan[e + f*x]^4)/f - (a^2*B*c
^5*Tan[e + f*x]^4)/(2*f) - (3*a^2*A*c^5*Tan[e + f*x]^5)/(5*f) - (((2*I)/5)*a^2*B*c^5*Tan[e + f*x]^5)/f + ((I/6
)*a^2*A*c^5*Tan[e + f*x]^6)/f - (a^2*B*c^5*Tan[e + f*x]^6)/(2*f) + ((I/7)*a^2*B*c^5*Tan[e + f*x]^7)/f

Maple [A] (verified)

Time = 0.36 (sec) , antiderivative size = 83, normalized size of antiderivative = 0.84

method result size
risch \(\frac {32 c^{5} a^{2} \left (42 i A \,{\mathrm e}^{4 i \left (f x +e \right )}+42 B \,{\mathrm e}^{4 i \left (f x +e \right )}+49 i A \,{\mathrm e}^{2 i \left (f x +e \right )}-21 B \,{\mathrm e}^{2 i \left (f x +e \right )}+7 i A -3 B \right )}{105 f \left ({\mathrm e}^{2 i \left (f x +e \right )}+1\right )^{7}}\) \(83\)
derivativedivides \(-\frac {i c^{5} a^{2} \left (-\frac {B \tan \left (f x +e \right )^{7}}{7}+\frac {\left (-3 i B -A \right ) \tan \left (f x +e \right )^{6}}{6}+\frac {\left (i A +4 i \left (i B -A \right )+6 B \right ) \tan \left (f x +e \right )^{5}}{5}+\frac {\left (-2 i B +2 A \right ) \tan \left (f x +e \right )^{4}}{4}+\frac {\left (-6 i A -4 i \left (i B -A \right )-B \right ) \tan \left (f x +e \right )^{3}}{3}+\frac {\left (i B +3 A \right ) \tan \left (f x +e \right )^{2}}{2}+i \tan \left (f x +e \right ) A \right )}{f}\) \(147\)
default \(-\frac {i c^{5} a^{2} \left (-\frac {B \tan \left (f x +e \right )^{7}}{7}+\frac {\left (-3 i B -A \right ) \tan \left (f x +e \right )^{6}}{6}+\frac {\left (i A +4 i \left (i B -A \right )+6 B \right ) \tan \left (f x +e \right )^{5}}{5}+\frac {\left (-2 i B +2 A \right ) \tan \left (f x +e \right )^{4}}{4}+\frac {\left (-6 i A -4 i \left (i B -A \right )-B \right ) \tan \left (f x +e \right )^{3}}{3}+\frac {\left (i B +3 A \right ) \tan \left (f x +e \right )^{2}}{2}+i \tan \left (f x +e \right ) A \right )}{f}\) \(147\)
norman \(\frac {A \,a^{2} c^{5} \tan \left (f x +e \right )}{f}-\frac {\left (-i A \,a^{2} c^{5}+3 B \,a^{2} c^{5}\right ) \tan \left (f x +e \right )^{6}}{6 f}-\frac {\left (2 i B \,a^{2} c^{5}+3 A \,a^{2} c^{5}\right ) \tan \left (f x +e \right )^{5}}{5 f}-\frac {\left (3 i B \,a^{2} c^{5}+2 A \,a^{2} c^{5}\right ) \tan \left (f x +e \right )^{3}}{3 f}+\frac {\left (-3 i A \,a^{2} c^{5}+B \,a^{2} c^{5}\right ) \tan \left (f x +e \right )^{2}}{2 f}-\frac {\left (i A \,a^{2} c^{5}+B \,a^{2} c^{5}\right ) \tan \left (f x +e \right )^{4}}{2 f}+\frac {i B \,a^{2} c^{5} \tan \left (f x +e \right )^{7}}{7 f}\) \(203\)
parallelrisch \(\frac {30 i B \,a^{2} c^{5} \tan \left (f x +e \right )^{7}+35 i A \tan \left (f x +e \right )^{6} a^{2} c^{5}-84 i B \tan \left (f x +e \right )^{5} a^{2} c^{5}-105 B \tan \left (f x +e \right )^{6} a^{2} c^{5}-105 i A \tan \left (f x +e \right )^{4} a^{2} c^{5}-126 A \tan \left (f x +e \right )^{5} a^{2} c^{5}-210 i B \tan \left (f x +e \right )^{3} a^{2} c^{5}-105 B \tan \left (f x +e \right )^{4} a^{2} c^{5}-315 i A \tan \left (f x +e \right )^{2} a^{2} c^{5}-140 A \tan \left (f x +e \right )^{3} a^{2} c^{5}+105 B \tan \left (f x +e \right )^{2} a^{2} c^{5}+210 A \tan \left (f x +e \right ) a^{2} c^{5}}{210 f}\) \(215\)
parts \(\frac {\left (-5 i A \,a^{2} c^{5}-B \,a^{2} c^{5}\right ) \left (\frac {\tan \left (f x +e \right )^{2}}{2}-\frac {\ln \left (1+\tan \left (f x +e \right )^{2}\right )}{2}\right )}{f}+\frac {\left (-5 i B \,a^{2} c^{5}-5 A \,a^{2} c^{5}\right ) \left (\frac {\tan \left (f x +e \right )^{3}}{3}-\tan \left (f x +e \right )+\arctan \left (\tan \left (f x +e \right )\right )\right )}{f}+\frac {\left (-3 i A \,a^{2} c^{5}+B \,a^{2} c^{5}\right ) \ln \left (1+\tan \left (f x +e \right )^{2}\right )}{2 f}+\frac {\left (-3 i B \,a^{2} c^{5}-A \,a^{2} c^{5}\right ) \left (\tan \left (f x +e \right )-\arctan \left (\tan \left (f x +e \right )\right )\right )}{f}+\frac {\left (-i A \,a^{2} c^{5}-5 B \,a^{2} c^{5}\right ) \left (\frac {\tan \left (f x +e \right )^{4}}{4}-\frac {\tan \left (f x +e \right )^{2}}{2}+\frac {\ln \left (1+\tan \left (f x +e \right )^{2}\right )}{2}\right )}{f}+\frac {\left (-i B \,a^{2} c^{5}-3 A \,a^{2} c^{5}\right ) \left (\frac {\tan \left (f x +e \right )^{5}}{5}-\frac {\tan \left (f x +e \right )^{3}}{3}+\tan \left (f x +e \right )-\arctan \left (\tan \left (f x +e \right )\right )\right )}{f}+\frac {\left (i A \,a^{2} c^{5}-3 B \,a^{2} c^{5}\right ) \left (\frac {\tan \left (f x +e \right )^{6}}{6}-\frac {\tan \left (f x +e \right )^{4}}{4}+\frac {\tan \left (f x +e \right )^{2}}{2}-\frac {\ln \left (1+\tan \left (f x +e \right )^{2}\right )}{2}\right )}{f}+A \,a^{2} c^{5} x +\frac {i B \,a^{2} c^{5} \left (\frac {\tan \left (f x +e \right )^{7}}{7}-\frac {\tan \left (f x +e \right )^{5}}{5}+\frac {\tan \left (f x +e \right )^{3}}{3}-\tan \left (f x +e \right )+\arctan \left (\tan \left (f x +e \right )\right )\right )}{f}\) \(429\)

[In]

int((a+I*a*tan(f*x+e))^2*(A+B*tan(f*x+e))*(c-I*c*tan(f*x+e))^5,x,method=_RETURNVERBOSE)

[Out]

32/105*c^5*a^2*(42*I*A*exp(4*I*(f*x+e))+42*B*exp(4*I*(f*x+e))+49*I*A*exp(2*I*(f*x+e))-21*B*exp(2*I*(f*x+e))+7*
I*A-3*B)/f/(exp(2*I*(f*x+e))+1)^7

Fricas [A] (verification not implemented)

none

Time = 0.25 (sec) , antiderivative size = 152, normalized size of antiderivative = 1.54 \[ \int (a+i a \tan (e+f x))^2 (A+B \tan (e+f x)) (c-i c \tan (e+f x))^5 \, dx=-\frac {32 \, {\left (42 \, {\left (-i \, A - B\right )} a^{2} c^{5} e^{\left (4 i \, f x + 4 i \, e\right )} + 7 \, {\left (-7 i \, A + 3 \, B\right )} a^{2} c^{5} e^{\left (2 i \, f x + 2 i \, e\right )} + {\left (-7 i \, A + 3 \, B\right )} a^{2} c^{5}\right )}}{105 \, {\left (f e^{\left (14 i \, f x + 14 i \, e\right )} + 7 \, f e^{\left (12 i \, f x + 12 i \, e\right )} + 21 \, f e^{\left (10 i \, f x + 10 i \, e\right )} + 35 \, f e^{\left (8 i \, f x + 8 i \, e\right )} + 35 \, f e^{\left (6 i \, f x + 6 i \, e\right )} + 21 \, f e^{\left (4 i \, f x + 4 i \, e\right )} + 7 \, f e^{\left (2 i \, f x + 2 i \, e\right )} + f\right )}} \]

[In]

integrate((a+I*a*tan(f*x+e))^2*(A+B*tan(f*x+e))*(c-I*c*tan(f*x+e))^5,x, algorithm="fricas")

[Out]

-32/105*(42*(-I*A - B)*a^2*c^5*e^(4*I*f*x + 4*I*e) + 7*(-7*I*A + 3*B)*a^2*c^5*e^(2*I*f*x + 2*I*e) + (-7*I*A +
3*B)*a^2*c^5)/(f*e^(14*I*f*x + 14*I*e) + 7*f*e^(12*I*f*x + 12*I*e) + 21*f*e^(10*I*f*x + 10*I*e) + 35*f*e^(8*I*
f*x + 8*I*e) + 35*f*e^(6*I*f*x + 6*I*e) + 21*f*e^(4*I*f*x + 4*I*e) + 7*f*e^(2*I*f*x + 2*I*e) + f)

Sympy [B] (verification not implemented)

Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 243 vs. \(2 (80) = 160\).

Time = 0.61 (sec) , antiderivative size = 243, normalized size of antiderivative = 2.45 \[ \int (a+i a \tan (e+f x))^2 (A+B \tan (e+f x)) (c-i c \tan (e+f x))^5 \, dx=\frac {224 i A a^{2} c^{5} - 96 B a^{2} c^{5} + \left (1568 i A a^{2} c^{5} e^{2 i e} - 672 B a^{2} c^{5} e^{2 i e}\right ) e^{2 i f x} + \left (1344 i A a^{2} c^{5} e^{4 i e} + 1344 B a^{2} c^{5} e^{4 i e}\right ) e^{4 i f x}}{105 f e^{14 i e} e^{14 i f x} + 735 f e^{12 i e} e^{12 i f x} + 2205 f e^{10 i e} e^{10 i f x} + 3675 f e^{8 i e} e^{8 i f x} + 3675 f e^{6 i e} e^{6 i f x} + 2205 f e^{4 i e} e^{4 i f x} + 735 f e^{2 i e} e^{2 i f x} + 105 f} \]

[In]

integrate((a+I*a*tan(f*x+e))**2*(A+B*tan(f*x+e))*(c-I*c*tan(f*x+e))**5,x)

[Out]

(224*I*A*a**2*c**5 - 96*B*a**2*c**5 + (1568*I*A*a**2*c**5*exp(2*I*e) - 672*B*a**2*c**5*exp(2*I*e))*exp(2*I*f*x
) + (1344*I*A*a**2*c**5*exp(4*I*e) + 1344*B*a**2*c**5*exp(4*I*e))*exp(4*I*f*x))/(105*f*exp(14*I*e)*exp(14*I*f*
x) + 735*f*exp(12*I*e)*exp(12*I*f*x) + 2205*f*exp(10*I*e)*exp(10*I*f*x) + 3675*f*exp(8*I*e)*exp(8*I*f*x) + 367
5*f*exp(6*I*e)*exp(6*I*f*x) + 2205*f*exp(4*I*e)*exp(4*I*f*x) + 735*f*exp(2*I*e)*exp(2*I*f*x) + 105*f)

Maxima [A] (verification not implemented)

none

Time = 0.41 (sec) , antiderivative size = 151, normalized size of antiderivative = 1.53 \[ \int (a+i a \tan (e+f x))^2 (A+B \tan (e+f x)) (c-i c \tan (e+f x))^5 \, dx=\frac {30 i \, B a^{2} c^{5} \tan \left (f x + e\right )^{7} + 35 \, {\left (i \, A - 3 \, B\right )} a^{2} c^{5} \tan \left (f x + e\right )^{6} - 42 \, {\left (3 \, A + 2 i \, B\right )} a^{2} c^{5} \tan \left (f x + e\right )^{5} + 105 \, {\left (-i \, A - B\right )} a^{2} c^{5} \tan \left (f x + e\right )^{4} - 70 \, {\left (2 \, A + 3 i \, B\right )} a^{2} c^{5} \tan \left (f x + e\right )^{3} + 105 \, {\left (-3 i \, A + B\right )} a^{2} c^{5} \tan \left (f x + e\right )^{2} + 210 \, A a^{2} c^{5} \tan \left (f x + e\right )}{210 \, f} \]

[In]

integrate((a+I*a*tan(f*x+e))^2*(A+B*tan(f*x+e))*(c-I*c*tan(f*x+e))^5,x, algorithm="maxima")

[Out]

1/210*(30*I*B*a^2*c^5*tan(f*x + e)^7 + 35*(I*A - 3*B)*a^2*c^5*tan(f*x + e)^6 - 42*(3*A + 2*I*B)*a^2*c^5*tan(f*
x + e)^5 + 105*(-I*A - B)*a^2*c^5*tan(f*x + e)^4 - 70*(2*A + 3*I*B)*a^2*c^5*tan(f*x + e)^3 + 105*(-3*I*A + B)*
a^2*c^5*tan(f*x + e)^2 + 210*A*a^2*c^5*tan(f*x + e))/f

Giac [B] (verification not implemented)

Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 180 vs. \(2 (83) = 166\).

Time = 1.02 (sec) , antiderivative size = 180, normalized size of antiderivative = 1.82 \[ \int (a+i a \tan (e+f x))^2 (A+B \tan (e+f x)) (c-i c \tan (e+f x))^5 \, dx=-\frac {32 \, {\left (-42 i \, A a^{2} c^{5} e^{\left (4 i \, f x + 4 i \, e\right )} - 42 \, B a^{2} c^{5} e^{\left (4 i \, f x + 4 i \, e\right )} - 49 i \, A a^{2} c^{5} e^{\left (2 i \, f x + 2 i \, e\right )} + 21 \, B a^{2} c^{5} e^{\left (2 i \, f x + 2 i \, e\right )} - 7 i \, A a^{2} c^{5} + 3 \, B a^{2} c^{5}\right )}}{105 \, {\left (f e^{\left (14 i \, f x + 14 i \, e\right )} + 7 \, f e^{\left (12 i \, f x + 12 i \, e\right )} + 21 \, f e^{\left (10 i \, f x + 10 i \, e\right )} + 35 \, f e^{\left (8 i \, f x + 8 i \, e\right )} + 35 \, f e^{\left (6 i \, f x + 6 i \, e\right )} + 21 \, f e^{\left (4 i \, f x + 4 i \, e\right )} + 7 \, f e^{\left (2 i \, f x + 2 i \, e\right )} + f\right )}} \]

[In]

integrate((a+I*a*tan(f*x+e))^2*(A+B*tan(f*x+e))*(c-I*c*tan(f*x+e))^5,x, algorithm="giac")

[Out]

-32/105*(-42*I*A*a^2*c^5*e^(4*I*f*x + 4*I*e) - 42*B*a^2*c^5*e^(4*I*f*x + 4*I*e) - 49*I*A*a^2*c^5*e^(2*I*f*x +
2*I*e) + 21*B*a^2*c^5*e^(2*I*f*x + 2*I*e) - 7*I*A*a^2*c^5 + 3*B*a^2*c^5)/(f*e^(14*I*f*x + 14*I*e) + 7*f*e^(12*
I*f*x + 12*I*e) + 21*f*e^(10*I*f*x + 10*I*e) + 35*f*e^(8*I*f*x + 8*I*e) + 35*f*e^(6*I*f*x + 6*I*e) + 21*f*e^(4
*I*f*x + 4*I*e) + 7*f*e^(2*I*f*x + 2*I*e) + f)

Mupad [B] (verification not implemented)

Time = 9.22 (sec) , antiderivative size = 158, normalized size of antiderivative = 1.60 \[ \int (a+i a \tan (e+f x))^2 (A+B \tan (e+f x)) (c-i c \tan (e+f x))^5 \, dx=\frac {A\,a^2\,c^5\,\mathrm {tan}\left (e+f\,x\right )+\frac {a^2\,c^5\,{\mathrm {tan}\left (e+f\,x\right )}^3\,\left (-3\,B+A\,2{}\mathrm {i}\right )\,1{}\mathrm {i}}{3}+\frac {a^2\,c^5\,{\mathrm {tan}\left (e+f\,x\right )}^5\,\left (-2\,B+A\,3{}\mathrm {i}\right )\,1{}\mathrm {i}}{5}-\frac {a^2\,c^5\,{\mathrm {tan}\left (e+f\,x\right )}^2\,\left (3\,A+B\,1{}\mathrm {i}\right )\,1{}\mathrm {i}}{2}-\frac {a^2\,c^5\,{\mathrm {tan}\left (e+f\,x\right )}^4\,\left (A-B\,1{}\mathrm {i}\right )\,1{}\mathrm {i}}{2}+\frac {a^2\,c^5\,{\mathrm {tan}\left (e+f\,x\right )}^6\,\left (A+B\,3{}\mathrm {i}\right )\,1{}\mathrm {i}}{6}+\frac {B\,a^2\,c^5\,{\mathrm {tan}\left (e+f\,x\right )}^7\,1{}\mathrm {i}}{7}}{f} \]

[In]

int((A + B*tan(e + f*x))*(a + a*tan(e + f*x)*1i)^2*(c - c*tan(e + f*x)*1i)^5,x)

[Out]

((a^2*c^5*tan(e + f*x)^3*(A*2i - 3*B)*1i)/3 - (a^2*c^5*tan(e + f*x)^2*(3*A + B*1i)*1i)/2 + (a^2*c^5*tan(e + f*
x)^5*(A*3i - 2*B)*1i)/5 + A*a^2*c^5*tan(e + f*x) - (a^2*c^5*tan(e + f*x)^4*(A - B*1i)*1i)/2 + (a^2*c^5*tan(e +
 f*x)^6*(A + B*3i)*1i)/6 + (B*a^2*c^5*tan(e + f*x)^7*1i)/7)/f